A method using subband coding is widely known as a technique capable of encoding a general audio signal (acoustic signal/sound signal) with a small information amount, and obtaining a high-quality reproduction signal. A representative example of coding using this subband is MPEG-2AAC (Advanced Audio Coding) as an international standard method of ISO/IEC.
When performing coding by the AAC method, scaling and quantization represented by equation (1) below are performed for each band including a plurality of signals X obtained by converting the frequency of a time signal. In the following equation, abs(X) is the absolute value of X, G is gain information, and α is an appropriate constant value.
                    [                  Mathematical          ⁢                                          ⁢          1                ]                                                            Xq        =                  int          (                                                    (                                                      abs                    ⁡                                          (                      X                      )                                                        ·                                      2                                                                  1                        4                                            ⁢                                              (                                                  G                          -                          100                                                )                                                                                            )                                            3                4                                      +            α                    )                                    (        1        )            
The signal X is scaled by using common gain information G in a certain band, and the scaled signal is quantized. The gain information G is determined based on the characteristics of an audio signal and human auditory characteristics.
The quantized signal Xq and gain information G are encoded, and the encoded information is written in a bit stream. The gain information G is represented by an initial value A and a gain difference d_scf from an adjacent band represented by equation (2) below. In the following equation, i is the index of a band number, and G(−1) is the initial value A.
[Mathematical 2]d—scf(i)=G(i)−G(i−1)  (2)
The AAC method encodes the initial value A by eight bits, and performs Huffman encoding on the gain difference. The Huffman code length herein used is designed to decrease when the absolute value of the gain difference is small and increase when the absolute value of the gain difference is large. On the decoding side, the gain information G is generated from the initial value A and the Huffman-decoded gain difference d_scf in accordance with equation (3) below. In the following equation, i is the index of a band number, and G(−1) is the initial value A.
[Mathematical 3]G(i)=d—scf(i)+G(i−1)  (3)
Then, inverse quantization is performed in accordance with equation (4) below by using the gain information G and quantized signal Xq. An output audio signal is obtained by converting the inversely quantized signal X into the time signal.
                    [                  Mathematical          ⁢                                          ⁢          4                ]                                                                      X          _                =                              Xq                          4              3                                ·                      2                                          1                4                            ⁢                              (                                  G                  -                  100                                )                                                                        (        4        )            
The method disclosed in Japanese Patent Laid-Open No. 2002-268693 is a conventional example of decreasing the code rate of the gain difference. FIG. 10 is a block diagram showing the arrangement of the conventional audio encoding/decoding apparatus. Referring to FIG. 10, in this conventional method of decreasing the gain difference, a frequency band integrator integrates a plurality of bands, and a gain calculator calculates a common gain of the plurality of bands. The method reduces the code rate of the gain information by reducing the Huffman code rate by setting 0 as the difference between the bands using the common gain.